import moment from 'moment';
moment.locale('zh-cn');

/**
 * 时间转换
 * @param time 时间戳 
 * @returns 
 */
const timeTran = (time: number) => {
    if (time) {
        return moment(time).startOf('minute').fromNow()
    } else {
        return ''
    }
}

export {
    timeTran
}